1. Technical Field
The present invention relates to an approximation method for series expansion of an input function and a system using the same, and, more particularly, to an approximation method and system for series expansion of an input function, which minimizes approximation errors in the series expansion of the input function of an arithmetic type.
2. Related Art
Generally, system design starts from upper level algorithm design, in which analysis and verification of the algorithm is performed, and is followed by lower level hardware design. In order to closely implement arithmetic functions used in the upper level algorithm design in the lower level hardware design, corresponding function values should be stored in a memory. In this case, since function values for every input variable should be reserved and stored, the memory should have a large capacity, resulting in a heavy burden in hardware design.
Accordingly, in system design, arithmetic functions for input variables are typically obtained by series expansion, rather than storing every function value for each input variable.
However, in practice, a series expansion formula cannot be implemented by a combination of an infinite number of terms to reach a nominal function value. Instead, a series expansion approximation formula, expanded using a finite number of terms, is typically used to obtain an approximate function value. In this case, an approximation error, or a truncation error, which represents a difference between the nominal function value and the approximated function value, occurs inevitably. Such an approximation error often causes critical malfunction or degradation of the system. A series expansion with as many terms as possible can reduce approximation errors, but it will automatically lead to a system of increased complexity required to implement such a series expansion.
Let us now assume that an arithmetic function S(x) is expressed in an infinite series expansion with terms, ƒ0(x),ƒ1(x),ƒ2(x) as follows:
                              S          ⁡                      (            x            )                          =                                            ∑                              n                =                0                            ∞                        ⁢                                          f                n                            ⁡                              (                x                )                                              =                                                    f                0                            ⁡                              (                x                )                                      +                                          f                1                            ⁡                              (                x                )                                      +                                          f                2                            ⁡                              (                x                )                                      +            ⋯                                              (        1        )            
For example, familiar trigonometric functions often employed in digital system design can be expanded in Taylor series about x=0. In this case, the terms of the trigonometric functions have alternating signs (+, −). Some common trigonometric functions expressed using Taylor series are as follows:
                              cos          ⁡                      (            x            )                          =                                            ∑                              n                =                0                            ∞                        ⁢                                                            (                                      -                    1                                    )                                n                            ⁢                                                x                                      2                    ⁢                    n                                                                    2                  ⁢                                      n                    !                                                                                =                      1            -                                          x                2                                            2                !                                      +                                          x                4                                            4                !                                      -            ⋯                                              (        2        )                                          sin          ⁡                      (            x            )                          =                                            ∑                              n                =                0                            ∞                        ⁢                                                            (                                      -                    1                                    )                                n                            ⁢                                                x                                                            2                      ⁢                      n                                        +                    1                                                                                        (                                                                  2                        ⁢                        n                                            +                      1                                        )                                    !                                                              =                      x            -                                          x                3                                            3                !                                      +                                          x                5                                            5                !                                      -            ⋯                                              (        3        )                                                      arctan            ⁡                          (              x              )                                =                                                    ∑                                  n                  =                  0                                ∞                            ⁢                                                                    (                                          -                      1                                        )                                    n                                ⁢                                                      x                                                                  2                        ⁢                        n                                            +                      1                                                                                                  2                      ⁢                      n                                        +                    1                                                                        =                          x              -                                                x                  3                                3                            +                                                x                  5                                5                            -                                                x                  7                                7                            +              ⋯                                      ⁢                                                      (        4        )                                          -          1                ≤        x        ≤        1                                        
However, in a fixed-point digital system, series expansion has a finite number of terms, thereby causing an approximation error. For example, if a partial sum,
            S      N        ⁡          (      x      )        =            ∑              n        =        0            N        ⁢                            (                      -            1                    )                n            ⁢                        f          n                ⁡                  (          x          )                    is used to approximate the function,
            S      ⁡              (        x        )              =                  ∑                  n          =          0                ∞            ⁢                                    (                          -              1                        )                    n                ⁢                              f            n                    ⁡                      (            x            )                                ,the approximation error is expressed as EN(x)=S(x)−SN(x). Since the absolute value |EN(X)| of the approximation error EN(X) increases with the absolute value |x| of the input variable x, more terms in the series expansion are required to reduce the approximation error.
To reduce the approximation error in an alternating series expansion, the Euler approximation method is frequently used. In the Euler approximation method, the same series expansion formula as in the Taylor series is applied up to term (N−1), while an Euler transformation formula is applied for the rest of the terms. For example, the function S(x) presented in equation (1) can be expressed as follows in equation (5):
                                                        ∑                              n                =                0                            ∞                        ⁢                                                            (                                      -                    1                                    )                                n                            ⁢                              f                n                                              =                                    f              0                        -                          f              1                        +                          f              2                        -            ⋯            -                          f                              N                -                1                                      +                                          ∑                                  n                  =                  0                                ∞                            ⁢                                                                                          (                                              -                        1                                            )                                        n                                                        2                                          n                      +                      1                                                                      ⁡                                  [                                                            Δ                      n                                        ⁢                                          f                      N                                                        ]                                                                    ,                                  ⁢                              for            ⁢                                                  ⁢            N                    =          even                                    (        5        )            wherein, Δ is called a forward difference operator and has the following characteristics:ΔƒN≡ƒN+1−ƒN Δ2ƒN≡ƒN+2−2ƒN+1+ƒN   (6)Δ3ƒN≡ƒN+3−3ƒN+2+3ƒN+1−ƒN, etc.
The Euler approximation method, however, also has a problem in that the rightmost term should have a large number of terms to achieve an accurate approximation and it works only for N=even.
Therefore, there is a need to provide an efficient approximation method for series expansion of functions and a system therefor, which can minimize an approximation error and be simply implemented in practice.